<template>
    <div @click="click">
        <div class="card">
            <div style="display: flex; flex-direction: row">
                <div style="flex-grow: 1"></div>
                <div class="label">
                    <text>
                        {{ status }}
                    </text>
                </div>
            </div>
            <div style="display: flex; flex-direction: row">
                <div class="image">
                    <img :src="image" style="width: 124px; height: 85px; border-radius: 5px" />
                </div>
                <div
                    style="
                        flex-grow: 1;
                        display: flex;
                        flex-direction: column;
                        align-items: start;
                        padding-left: 10px;
                        justify-content: space-between;
                    "
                >
                    <div>
                        <text class="titleText">{{ title }}</text>
                    </div>

                    <div style="display: flex; flex-direction: column; align-items: start">
                        <div>
                            <text class="subText">预约时间：{{ time }}</text>
                        </div>
                        <div>
                            <text class="subText">门店地址：{{ location }}</text>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import request from '@/utils/request'
import { defineComponent, reactive, ref, defineProps } from 'vue'
import { useStore } from 'vuex'
import TimePlace from '@/activityPages/components/time-place.vue'

const props = defineProps(['image', 'title', 'time', 'location', 'status', 'id'])

console.log('my rev card props', props)

function click() {
    console.log('click activity card props=', props)
    uni.navigateTo({
        url: `/activityPages/office-share/common-share-order-detail?type=${props.title}`
    })
}
</script>

<style lang="scss" scoped>
.card {
    display: flex;
    flex-direction: column;

    line-height: 20px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 1);
    color: rgba(16, 16, 16, 1);
    font-size: 14px;
    text-align: center;
    font-family: Roboto;
    margin-bottom: 10px;
    padding: 10px;
    padding-top: 0px;
    padding-right: 0px;

    .image {
        width: 124px;
        height: 85px;
        background-color: rgba(229, 229, 229, 1);
    }

    .titleText {
        line-height: 17px;
        color: rgba(16, 16, 16, 1);
        font-size: 12px;
        text-align: left;
        font-family: PingFangSC-regular;
        font-weight: bold;
    }

    .subText {
        color: rgba(153, 153, 153, 1);
        font-size: 10px;
        text-align: left;
        font-family: PingFangSC-regular;
    }

    .label {
        line-height: 15px;
        border-radius: 0px 10px 10px 0px;
        background-color: rgba(116, 184, 247, 1);
        color: rgba(255, 255, 255, 1);
        font-size: 10px;
        text-align: center;
        font-family: Microsoft Yahei;
        padding: 2px;
    }
}
</style>
